package braden.cis.uab.edu.automaton;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.widget.Toast;

public class StepTestActivity extends Activity {

	private StepTestDrawingPanel panel;
	private Automaton automatonToTest;
	private String stringToTest;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		// get rid of the title bar
		requestWindowFeature(Window.FEATURE_NO_TITLE);

		Bundle bundle = this.getIntent().getExtras();
		if (bundle != null) {

			//automatonToTest = Automaton.deserializeObject(bundle.getByteArray("fatotest"));
			automatonToTest = Test.automaton;
			stringToTest = bundle.getString("stringtotest");
			
			
		}
		
		// create the drawing panel and set it as the content view
		panel = new StepTestDrawingPanel(this, automatonToTest, stringToTest);
		setContentView(panel);
		
		panel.drawAutomaton(automatonToTest);

		Toast.makeText(this, stringToTest, Toast.LENGTH_LONG).show();
	}

}
